import os
import pytest

if __name__ == "__main__":
    # 在这里配置allure
    # --alluredir ./report/json_report 指定一个目录, 并生成中间结果
    # --clean-alluredir 每次运行会清空中间结果
    # pytest.main(["-vs","test_runner.py","--alluredir","./report/json_report","--clean-alluredir","./report/json_report"])
    pytest.main(["-vs", "./testcase/test_runner.py", "--alluredir", "./report/json_report", "--clean-alluredir","./report/json_report"])
    os.system("allure generate ./report/json_report -o ./report/html_report.html --clean")